<div class="block" [@flyInOut]="flyState">

</div>

<button (click)="changeState()">
    change state
</button>